<template>
	<view class="content">
		<view v-for="(item,index) in addressList">
			<uni-card 
			:title="item.title"
			mode="style"
			:is-shadow="true"
			:thumbnail="item.img"
			note="Tip"
			 :note="item.content"
				></uni-card>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				addressList:[],
				addressInfo:{
					address:'',
					title:'',
					content:'',
					img:''
				},
			}
		},
		
		// 页面一加载就请求函数
		
		onLoad() { 
			this.initData()
		},
		methods: {
			initData(){
				uni.request({
				    url: 'https://xunji.xmxland.space/initData',
					method:'GET',
					// 数据请求成功就将数据存入addresslist中
				    success: (res) => {
						this.addressList = res.data 
				    }
				});
			}
		},
		created() {
			
		}
	}
</script>

<style>
	.content {
		width: 90%;
		height: 30%;
		padding:0 5%;
	}



</style>
